package com.example.demo.controller.AuthorControl;

import com.example.demo.entity.requestJson.ListSignInDetailRequest;
import com.example.demo.service.SignInService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : 洪俊新
 * @date : 2021/3/22 15:28
 * @description:
 */
@RestController
@RequestMapping("/author/sign")
@Api(value = "签到接口", tags = "签到接口")
public class SignController {
    @Autowired
    private SignInService signInService;

    /**
     * 查看是否签到
     */
    @ApiOperation(value = "查看用户是否签到接口", notes = "")
    @ApiOperationSupport(author = "杨")
    @ApiResponses(
            @ApiResponse(code = 200, message = "处理成功")
    )

    @GetMapping("/issign")
    public Object isSign(ListSignInDetailRequest listSignInDetailRequest) {
        return signInService.checkSignIn(listSignInDetailRequest);
    }

    /**
     * 签到
     *//*
    @ApiOperation(value = "用户签到接口", notes = "")
    @ApiOperationSupport(author = "杨")
    @ApiResponses(
            @ApiResponse(code = 200, message = "处理成功")
    )

    @PostMapping("/sign")
    public Object listSignInDetail(@RequestBody @Validated ListSignInDetailRequest listSignInDetailRequest) {
        return signInService.postSignIn(listSignInDetailRequest);
    }*/
}
